package com.epro.dx.task;


import android.os.AsyncTask;

import com.epro.dx.util.ActivityUtil;
import com.weipu.common.facade.factory.ProviderFactory;
import com.weipu.common.util.Logger;

/**
 * 登陆时用户使用默认配置注册物流信息推送功能
 * @author Zenglw
 * @version [1.0,2017-6-23]
 * @see [相关类/方法]
 *
 */

public class SetShippingTask extends AsyncTask<Void, Void, Boolean> {


    @Override
    protected Boolean doInBackground(Void... voids) {
        boolean isSuccess = ProviderFactory.createTrackService()
                .registShippingPush(ActivityUtil.getCustomerID(), ActivityUtil.getCustomerToken());

        return isSuccess;
    }

    @Override
    protected void onPostExecute(Boolean aBoolean) {
        super.onPostExecute(aBoolean);
        if (aBoolean) {
            Logger.e("SetShippingTask","登陆时注册推送成功");

        } else {
            Logger.e("SetShippingTask","登陆时注册推送失败");

        }
    }
}
